<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="ThemeBucket">
    <link rel="shortcut icon" href="#" type="image/png">

    <title>Editable Table</title>

    <link th:include="common::commonheader">
</head>

<body class="sticky-header">

<section>

    <div th:replace="common::#leftmenu"></div>
    <div class="main-content" >
        <div th:replace="common::#topmenu"></div>


        <!-- page heading start-->
        <div class="page-heading">
            <h3>
            </h3>
            <ul class="breadcrumb">
                <li>
                    <a href="#">首页</a>
                </li>
                <li class="active">技术部成员</li>
            </ul>
        </div>
        <!-- page heading end-->

        <!--body wrapper start-->
        <div class="wrapper">
            <div class="row">
                <div class="col-sm-12">
                    <section class="panel">
                        <header class="panel-heading">
                            技术部成员
                            <span class="tools pull-right">
                        <a href="javascript:;" class="fa fa-chevron-down"></a>
                        <a href="javascript:;" class="fa fa-times"></a>
                     </span>
                        </header>
                        <div class="panel-body">
                            <div class="adv-table editable-table ">
                                <div class="clearfix">
                                    <div class="btn-group">
                                        <a id="editable-sample_new" class="btn btn-primary" type="button" th:href="@{/student_dept_01_add_table}">
                                            Add New <i class="fa fa-plus"></i>
                                        </a>
                                    </div>
                                    <div class="btn-group pull-right">
                                        <button class="btn btn-default dropdown-toggle" data-toggle="dropdown">Tools <i class="fa fa-angle-down"></i>
                                        </button>
                                        <ul class="dropdown-menu pull-right">
                                            <li><a href="#">Print</a></li>
                                            <li><a href="#">Save as PDF</a></li>
                                            <li><a href="#">Export to Excel</a></li>
                                        </ul>
                                    </div>
                                </div>
                                <div class="space15"></div>
                                <table class="table table-striped table-hover table-bordered" id="editable-sample">
                                    <thead>
                                    <tr>
                                        <th>编号</th>
                                        <!--                    <th>ID</th>-->
                                        <th>学号</th>
                                        <th>姓名</th>
                                        <th>性别</th>
                                        <th>年级</th>
                                        <th>专业</th>
                                        <th>QQ</th>
                                        <th>电话号码</th>
                                        <th>部门</th>
                                        <th colspan="2" align="center">操作</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr class="" th:each="s1,stats:${result}">
                                        <td th:text="'CA'+${stats.count}">Id</td>
                                        <!--              <td th:text="${user.getAId()}">Id</td>-->
                                        <td th:text="${s1.getSNo()}">title</td>
                                        <td th:text="${s1.getSName()}">aShow</td>
                                        <td>[[${s1.getSex()}]]</td>
                                        <td th:text="${s1.getSGrade()}">aTime</td>
                                        <td th:text="${s1.getSProfessional()}">credit</td>
                                        <td th:text="${s1.getQq()}">credit</td>
                                        <td th:text="${s1.getTelephoneNum()}">credit</td>
                                        <td th:text="${s1.getDName()}">credit</td>
                                        <td>
                                            <a th:href="@{/student_dept_01/update-get/{id}(id=${s1.getSNo()},pn=${page.current})}" class="btn btn-danger btn-sm" type="button">编辑</a>
                                        </td>
                                        <td>
                                            <a th:href="@{/student_dept_01/delete/{id}(id=${s1.getSNo()},pn=${page.current})}" class="btn btn-danger btn-sm" type="button">删除</a>
                                        </td>

                                    </tr>

                                    </tbody>
                                </table>
                                <div class="row-fluid">
                                    <div class="span6">
                                        <div class="dataTables_info" id="dynamic-table_info">当前第 [[${page.current}]] 页
                                            总计 [[${page.pages}]] 页 共 [[${page.getTotal()}]] 条记录
                                        </div>
                                    </div>
                                    <div class="span6">
                                        <div class="dataTables_paginate paging_bootstrap pagination">
                                            <ul>
                                                <li class="prev disabled"><a href="#">← Previous</a></li>
                                                <li th:class="${num==page.current?'active':''}"  th:each="num:${#numbers.sequence(1,page.pages)}">
                                                    <a th:href="@{/activities_table(pn=${num})}">[[${num}]]</a>
                                                </li>
                                                <li class="next"><a href="#">Next → </a></li>
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </section>
                </div>
            </div>
        </div>
        <!--body wrapper end-->

        <!--footer section start-->
        <footer>
            创新创业型学社
        </footer>
        <!--footer section end-->


    </div>
    <!-- main content end-->
</section>



<!--data table-->
<script type="text/javascript" src="js/data-tables/jquery.dataTables.js"></script>
<script type="text/javascript" src="js/data-tables/DT_bootstrap.js"></script>

<div th:replace="common::#commonscrip"></div>

<!--script for editable table-->
<script src="js/editable-table.js"></script>

<!-- END JAVASCRIPTS -->
<script>
    jQuery(document).ready(function() {
        EditableTable.init();
    });
</script>

</body>
</html>
